package com.bluesky.plum.domain.repository.search.operator;

public enum BooleanOperator implements LogicOperator{
	And {
		@Override
		Boolean localOperate(Boolean o1, Boolean o2) {

			return (o1 && o2);
		}
	},
	Or {
		@Override
		Boolean localOperate(Boolean o1, Boolean o2) {

			return (o1 || o2);
		}
	};

	abstract Boolean localOperate(Boolean o1, Boolean O2);

	public Boolean operate(Object o1,Object o2){
		return localOperate((Boolean)o1,(Boolean)o2);
	}
}
